<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>VUE3: 多个条件渲染</title>
  </head>
  <body>
    <div id="app"></div>

    <template id="tpl">
      <div>
        <input v-model.number="score" type="number" min="0" max="100" />
      </div>
      <div v-if="(score < 0 || score > 100)">错误</div>
      <template v-else>
        <div v-if="score < 60">不及格</div>
        <div v-else-if="score < 80">及格</div>
        <div v-else-if="score < 90">良好</div>
        <div v-else>优秀</div>
      </template>
    </template>

    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
    <script>
      Vue.createApp({
        template: "#tpl",
        data() {
          return {
            score: 0,
          };
        },
      }).mount("#app");
    </script>
  </body>
</html>
